
import * as types from '../actions/actionTypes';

const initialState = {
    isToasting: false,
    commonBanners: {},
    bannerKind:'',
    isLoading: true,
};

let commonReducer = (state=initialState, action) => {
    switch (action.type) {
        case types.kCommonIsToasting:
            return {
                ...state,
                isToasting: action.isToasting,
            };
        case types.kCommonBannerList:
            return {
                ...state,
            };
        case types.kCommonBannerListReceived:
            return {
                ...state,
                bannerKind: action.bannerKind,
                commonBanners: action.commonBanners,
                isLoading: false,
            };
        default:
            return state;
    }
};

export default commonReducer;